package mobi.hami.huapin.dao;

import mobi.hami.huapin.daobase.CrudMapper;
import mobi.hami.huapin.model.UserReturnGoodsLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Map;

public interface UserReturnGoodsLogMapper extends CrudMapper<UserReturnGoodsLog> {

    @Select("select * from user_returngoods_log where user_id = #{user_id} and open_id = #{open_id} and the_order_id = #{order_id} order by create_time desc LIMIT 1")
    UserReturnGoodsLog find(@Param("user_id") Integer user_id, @Param("open_id") String open_id, @Param("order_id") Integer order_id);

    @SelectProvider(type = UserReturnGoodsLogProvider.class,method = "selectWitchParam")
    List<UserReturnGoodsLog> selectWitchParam(Map<String,Object> parms);
}
